﻿using PropertyExpression.Common;

namespace PropertyExpression.RelationalDataInstance
{
    public interface IDataInstanceSchemaItem<out TEntity>
    {
        IDataInstanceSchemaItem<TEntity> Reference<TProperty>(
            IPropertyExpressionProxy<TEntity, TProperty> propertyExpressionProxy,
            Action<IDataInstanceSchemaItem<TProperty>> action);

        IDataInstanceSchemaItem<TEntity> Reference<TItem>(
            IPropertyExpressionProxy<TEntity, IManyReferenceEdge<TItem>> propertyExpressionProxy,
            Action<IDataInstanceSchemaItem<TItem>> action);

        IDataInstanceSchemaItem<TEntity> Field<TProperty>(IPropertyExpressionProxy<TEntity, TProperty> propertyExpressionProxy);
    }
}